= form_for [:admin, @layout], :html => {'data-onsubmit_status' => onsubmit_status(@layout)} do |f|
  = f.hidden_field :lock_version
  = render_region :form_top, :locals => {:f => f}
  .form_area
    - render_region :form, :locals => {:f => f} do |form|
      - form.edit_title do
        %p.title
          = f.label :name, t('name')
          = f.text_field :name, :maxlength => 100, :class => "textbox", :required => true
      - form.edit_extended_metadata do
        .drawer
          .drawer_contents#attributes
            %table.fieldset
              %tr
                %th.label= f.label :content_type, t('content_type').html_safe
                %td.field= f.text_field :content_type, :maxlength => 40, :class => "textbox"
              = render_region :extended_metadata, :locals => {:f => f}
          .drawer_handle
            %a.toggle{:href=>'#attributes', :rel=>"toggle[attributes]", :class=>"#{(meta_errors? ? 'less' : 'more')}"}= meta_label
      - form.edit_content do
        %p.content
          = f.label :content, "Body"
          ~ f.text_area :content, :size => "40x20", :style => "width: 100%", :class => "textarea large"
  - render_region :form_bottom, :locals => {:f => f} do |form_bottom|
    - form_bottom.reference_links do
      %p
        %span.reference_links
          Reference:
          %span{:id => "tag_reference_link"}
            = link_to t('available_tags'), admin_reference_url(:tags), id: 'tag_reference'
    - form_bottom.edit_buttons do
      .buttons
        = save_model_button @layout
        = save_model_and_continue_editing_button @layout
        = t('or')
        = link_to t('cancel'), admin_layouts_path, class: 'alt'
    - form_bottom.edit_timestamp do
      = updated_stamp @layout
